package com.rocsea.robot.model.request;

import io.swagger.models.auth.In;

import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/**
 * 批量切换数据源
 * @Author RocSea
 * @Date 2023/4/26
 */
public class BatchSwitchDatasourceRequest {
    private Integer moduleType;
    private String schemaName;
    private List<String> tableNameList;
    private Long newDatasourceId;

    public Integer getModuleType() {
        return moduleType;
    }

    public void setModuleType(Integer moduleType) {
        this.moduleType = moduleType;
    }

    public String getSchemaName() {
        return schemaName;
    }

    public void setSchemaName(String schemaName) {
        this.schemaName = schemaName;
    }

    public List<String> getTableNameList() {
        return Objects.isNull(tableNameList) ? new ArrayList<>() : new ArrayList<>(tableNameList);
    }

    public void setTableNameList(List<String> tableNameList) {
        this.tableNameList = Objects.isNull(tableNameList) ? new ArrayList<>() : new ArrayList<>(tableNameList);
    }

    public Long getNewDatasourceId() {
        return newDatasourceId;
    }

    public void setNewDatasourceId(Long newDatasourceId) {
        this.newDatasourceId = newDatasourceId;
    }
}
